export const defaultRoute = [
    {
        // ()=>import() 路由懒加载,只在需要时导入路由组件
        path: '/',
        component: () => import('@/views/home/layout/index.vue'),
        name: 'layout',
        meta: {
            title: "layout",
            hidden: true,
            icon: "HomeFilled"
        },
        redirect: "/home",
        // 路由元信息
    }, {
        path: "/home",
        component: () => import("@/views/home/layout/index.vue"),
        name: "home",
        meta: {
            title: "首页",
            icon: "HomeFilled"
        }
    } , {
        path: '/login',
        component: () => import('@/views/login/index.vue'),
        name: 'login',
        meta: {
            title: "登录页",
            hidden: true
        },
    }, {
        path: '/404',
        component: () => import('@/views/pageNotFound/index.vue'),
        name: '404',
        meta: {
            title: "404页",
            hidden: true
        },
    }, {
        // (.*)* 是一个正则表达式,匹配所有不在路由规则内的访问,并路由到404页
        path: '/:pathMatch(.*)*',
        component: () => import('@/views/pageNotFound/index.vue'),
        name: 'any',
        meta: {
            title: "404重定向",
            hidden: true
        },
    }, {
        path: "/screen",
        name: "Screen",
        component: () => import("@/views/screen/screen.vue"),
        meta: {
            title: "实时物流",
            hidden: false,
            icon: "DataAnalysis"
        }
    }, {
        path: "/acl",
        name: "Acl ",
        // 当一条包含子路由的路由记录发生跳转时,会首先渲染父路由component属性对应的组件
        // 这个组件中必须包含router-view标签,此时子路由会在该标签区域渲染
        // 如果父路由component属性指向的组件中没有router-view标签
        // 子路由指向的组件也无法显示
        component: () => import("@/views/home/layout/index.vue"),
        meta: {
            title: "权限管理",
            hidden: false,
            icon: "Lock"
        },
        children: [{
            path: "userControl",
            name: "userControl",
            component: () => import("@/views/acl/user/userControl.vue"),
            meta: {
                title: "用户管理",
                icon: "User"
            }
        }, {
            path: "roleControl",
            name: "roleControl",
            component: () => import("@/views/acl/role/roleControl.vue"),
            meta: {
                title: "角色管理",
                icon: "Key"
            }
        }, {
            path: "menuControl",
            name: "menuControl",
            component: () => import("@/views/acl/menu/menuControl.vue"),
            meta: {
                title: "菜单管理",
                icon: "Operation"
            }
        }]
    }, {
        path: "/product",
        name: "product",
        component: () => import("@/views/home/layout/index.vue"),
        meta: {
            title: "商品管理",
            icon: "Handbag"
        },
        children: [{
            path: "brandControl",
            name: "brandControl",
            component: () => import("@/views/product/brandControl/brandControl.vue"),
            meta: {
                title: "合作品牌",
                icon: "Medal"
            }
        }, {
            path: "attrControl",
            name: "attrControl",
            component: () => import("@/views/product/attrControl/attrControl.vue"),
            meta: {
                title: "属性管理",
                icon: "Filter"
            }
        }, {
            path: "spuControl",
            name: "spuControl",
            component: () => import("@/views/product/spuControl/spuControl.vue"),
            meta: {
                title: "SPU管理",
                icon: "Paperclip"
            }
        }, {
            path: "skuControl",
            name: "skuControl",
            component: () => import("@/views/product/skuControl/skuControl.vue"),
            meta: {
                title: "SKU管理",
                icon: "Finished"
            }
        }]
    }]
